home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 3.1 / toasterall / arexx_examples / framerenum.rexx < prev    next >
OS/2 REXX Batch file  |  1993-09-21  |  524b  |  25 lines

  1. /*  FrameRenum.rexx -- Renumber frames in sequence by adding an offset */
  2. /*  By Arnie Cachelin © 1993 NewTek, Inc. */
  3.  
  4. parse arg base base2 start off 
  5.  
  6. if base="" | base2="" | start="" | off="" then do
  7.     say "USAGE rx FrameRenum sourcename destname start# offset"
  8.     exit
  9.     end
  10.  
  11. f=start
  12. if f<1000 then d=3
  13. else d=4
  14. sname=base||right(f,d,'0')
  15. dname=base2||right(f+off,d,'0')
  16. do while exists(sname)
  17.     say COPY sname dname
  18.     f=f+1
  19.     if f<1000 then d=3
  20.     else d=4
  21.     sname=base||right(f,3,'0')
  22.     dname=base2||right(f+off,3,'0')
  23.     end
  24.  
  25. exit